{if count($newsTb)==0}
  {php}return;{/php}
{/if}
{assign var=truncate value=$param.news_truncate|default:80}
{php}
  css::addWidget('loliNews.css');
  js::addWidget('loliNews.js');
{/php}

<h1>
{if count($newsTb)==0}
Aucune nouvelle
{else if count($newsTb)==1}
Dernière nouvelle
{else}
Dernières nouvelles
{/if}
{widget name="form" type="manageNews"}
</h1>
<ul class="items">
  {foreach from=$newsTb item=news} 
    {* Type d'evenement *}
    <li class="news-{$news->news_id} item" data-id="{$news->news_id}">
      <div class="mod detail">
        <h3 class="title line">{$news->news_title}{widget name="form" type="manageNews"}</h3>
        {if isset($news->news_date) && $news->news_date>0}
        <p class="date right">{$news->news_date|date_format:"%A %d %B"}</p>
        {/if}
        <div class="text line">
          {$news->news_txt|nl2br}
          <span class="more hidden">.</span>
        </div>
        <a class="suite hidden" href="#"><span>Lire la suite</span></a>
        <p class="edit right">Edité le {$news->news_crdt|date_format:"%d %b"}</p>
      </div>
    </li>
  {foreachelse}
    <li class="news-0 item">
      Vous cherchez des nouvelles?<br />
      <a href="http://news.google.com/?hl=fr&gl=fr&tbm=nws&q=improvisation" target="_blank">Essayez par là!</a>
    </li>
    
  {/foreach}
</ul>
<div class="viewer" title="titre">body</div>